using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

namespace ClientTools.Client.Controls.Packager.PackageClasses
{
    public class Info
    {
        private Package _package = new Package();

        [XmlElement("package")]
        public Package Package
        {
            get { return _package; }
            set { _package = value; }
        }

        private Author _author = new Author();

        [XmlElement("author")]
        public Author Author
        {
            get { return _author; }
            set { _author = value; }
        }

        private string _readme;
        [XmlIgnore]
        public string Readme
        {
            get { return _readme; }
            set { _readme = value; }
        }

        [XmlElement("readme")]
        public XmlCDataSection ReadmeCdata
        {
            get 
            {
                XmlDataDocument doc = new XmlDataDocument();
                XmlCDataSection cd = doc.CreateCDataSection(_readme);
                return cd;
            }
            set { _readme = value.Value; }
        }
    }
}
